package com.michael.retail.sys.api.feign;

import com.michael.retail.commons.pojo.global.R;
import com.michael.retail.sys.api.pojo.entity.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 类功能描述:
 * <pre>
 *   系统用户
 * </pre>
 *
 * @author Michael
 * @version 1.0
 * @date 2021/7/5 20:15
 */
@FeignClient(value = "michael-sys", contextId = "sys-user", fallback = SysUserFeignFallback.class)
public interface SysUserFeign {

    @GetMapping("/api/v1/users/username/{username}")
    R<SysUser> getUserByUsername(@PathVariable("username") String username);
}
